package com.xjoyt.pay.operater.auth.interfaces;

import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.xjoyt.pay.dto.ExecuteResult;
import com.xjoyt.pay.dto.PageParam;
import com.xjoyt.pay.dto.PageResult;
import com.xjoyt.pay.operater.auth.params.RolePageParam;
import com.xjoyt.pay.operater.auth.po.Role;

public interface RoleContract {

	@RequestMapping(value = "loadPage", method = RequestMethod.POST)
	PageResult<Role> loadPage(@RequestBody PageParam<RolePageParam> param);

	@RequestMapping(value = "findAll", method = RequestMethod.POST)
	List<Role> findAll(@RequestBody RolePageParam param);

	@RequestMapping(value = "save", method = RequestMethod.POST)
	ExecuteResult<Role> save(Role param);

	@RequestMapping("remove/{id}")
	ExecuteResult<?> remove(@PathVariable("id") String id);

	@RequestMapping(value = "saveNode/{id}", method = RequestMethod.POST)
	ExecuteResult<?> saveNode(@PathVariable("id") String id, List<String> nodeList);
}
